package com.anhry.app.safety.manage.oa.bean;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.anhry.app.safety.manage.enterprise.bean.TbCorpInfo;
import com.anhry.app.safety.manage.system.bean.TbUser;

/**
 * 
 * @author chen
 * @date 2012-8-20
 */
@Entity
@Table(name = "TB_OA_CALL_MSG_VIEW")
public class TbOaCallMsgView implements java.io.Serializable {

	// Fields

	private Long id;

	private String msgTitle;//

	private String msgContent;//

	private Date msgTime;//

	// private String msgUser;
	// private String addsUser;

	private TbUser msgUser;// 消息发送人

	private TbUser tbUser;// 接收者（管理员）

	private TbCorpInfo tbCorpInfo;// 接收者（企业）

	// private String addsCorp;

	private String userTypes;// 接受者类型0：管理员1：企业

	private String msgType;// 消息类型0：个人1：系统

	private String isRead;// 是否阅读0：未读1：已读

	private Date readTime;//

	private String noteNum;//

	private String noteNums;//

	private String noteAtTime;//

	private Date noteTime;//

	private String eventType;//

	private String isDele;

	private String version;

	private TbOaPersonCall tbPersonCall;// 个人消息对应提醒id

	private String callType;//

	private String isCorper;// 企业接受者0：负责人1：安全负责人

	private String msgYear;

	private String msgQuarter;

	private String msgMonth;

	// Constructors

	/** default constructor */
	public TbOaCallMsgView() {
	}

	/** full constructor */
	public TbOaCallMsgView(Long id) {
		this.id = id;
	}

	/** full constructor */
	public TbOaCallMsgView(Long id, String msgTitle, String msgContent,
			Date msgTime, TbUser msgUser, TbUser tbUser, TbCorpInfo tbCorpInfo,
			String userTypes, String msgType, String isRead, Date readTime,
			String noteNum, String callType, String isCorper, String noteNums,
			String noteAtTime, Date noteTime, TbOaPersonCall tbPersonCall,
			String eventType, String isDele, String version) {
		this.id = id;
		this.msgTitle = msgTitle;
		this.msgContent = msgContent;
		this.msgTime = msgTime;
		this.msgUser = msgUser;
		this.tbUser = tbUser;
		this.tbCorpInfo = tbCorpInfo;
		this.userTypes = userTypes;
		this.msgType = msgType;
		this.isRead = isRead;
		this.readTime = readTime;
		this.noteNum = noteNum;
		this.noteNums = noteNums;
		this.noteAtTime = noteAtTime;
		this.noteTime = noteTime;
		this.eventType = eventType;
		this.isDele = isDele;
		this.version = version;
		this.tbPersonCall = tbPersonCall;
		this.callType = callType;
		this.isCorper = isCorper;
	}

	// Property accessors
	@Id
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "MSG_TITLE")
	public String getMsgTitle() {
		return msgTitle;
	}

	public void setMsgTitle(String msgTitle) {
		this.msgTitle = msgTitle;
	}

	@Column(name = "MSG_CONTENT")
	public String getMsgContent() {
		return msgContent;
	}

	public void setMsgContent(String msgContent) {
		this.msgContent = msgContent;
	}

	@Column(name = "MSG_TIME")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getMsgTime() {
		return msgTime;
	}

	public void setMsgTime(Date msgTime) {
		this.msgTime = msgTime;
	}

	@ManyToOne(cascade = { CascadeType.REFRESH }, fetch = FetchType.EAGER)
	@JoinColumn(name = "MSG_USER")
	public TbUser getMsgUser() {
		return msgUser;
	}

	public void setMsgUser(TbUser msgUser) {
		this.msgUser = msgUser;
	}

	@ManyToOne(cascade = { CascadeType.REFRESH }, fetch = FetchType.EAGER)
	@JoinColumn(name = "ADDS_USER")
	public TbUser getTbUser() {
		return tbUser;
	}

	@ManyToOne(cascade = { CascadeType.REFRESH }, fetch = FetchType.EAGER)
	@JoinColumn(name = "ADDS_CORP")
	public TbCorpInfo getTbCorpInfo() {
		return tbCorpInfo;
	}

	public void setTbCorpInfo(TbCorpInfo tbCorpInfo) {
		this.tbCorpInfo = tbCorpInfo;
	}

	@Column(name = "USER_TYPES", length = 1)
	public String getUserTypes() {
		return userTypes;
	}

	public void setUserTypes(String userTypes) {
		this.userTypes = userTypes;
	}

	@Column(name = "MSG_TYPE", length = 1)
	public String getMsgType() {
		return msgType;
	}

	public void setMsgType(String msgType) {
		this.msgType = msgType;
	}

	@Column(name = "IS_READ", length = 1)
	public String getIsRead() {
		return isRead;
	}

	public void setIsRead(String isRead) {
		this.isRead = isRead;
	}

	@Column(name = "READ_TIME")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getReadTime() {
		return readTime;
	}

	public void setReadTime(Date readTime) {
		this.readTime = readTime;
	}

	@Column(name = "NOTE_NUM", length = 10)
	public String getNoteNum() {
		return noteNum;
	}

	public void setNoteNum(String noteNum) {
		this.noteNum = noteNum;
	}

	@Column(name = "NOTE_NUMS", length = 10)
	public String getNoteNums() {
		return noteNums;
	}

	public void setNoteNums(String noteNums) {
		this.noteNums = noteNums;
	}

	@Column(name = "NOTE_AT_TIME", length = 10)
	public String getNoteAtTime() {
		return noteAtTime;
	}

	public void setNoteAtTime(String noteAtTime) {
		this.noteAtTime = noteAtTime;
	}

	@Column(name = "NOTE_TIME", length = 10)
	@Temporal(TemporalType.TIMESTAMP)
	public Date getNoteTime() {
		return noteTime;
	}

	public void setNoteTime(Date noteTime) {
		this.noteTime = noteTime;
	}

	@Column(name = "EVENT_TYPE", length = 1)
	public String getEventType() {
		return eventType;
	}

	public void setEventType(String eventType) {
		this.eventType = eventType;
	}

	@Column(name = "IS_DELE", length = 1)
	public String getIsDele() {
		return isDele;
	}

	public void setIsDele(String isDele) {
		this.isDele = isDele;
	}

	@Column(name = "VERSION", length = 10)
	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	@ManyToOne(cascade = { CascadeType.REFRESH }, fetch = FetchType.EAGER)
	@JoinColumn(name = "PER_CALL_ID")
	public TbOaPersonCall getTbPersonCall() {
		return tbPersonCall;
	}

	public void setTbPersonCall(TbOaPersonCall tbPersonCall) {
		this.tbPersonCall = tbPersonCall;
	}

	@Column(name = "CALL_TYPE", length = 10)
	public String getCallType() {
		return callType;
	}

	public void setCallType(String callType) {
		this.callType = callType;
	}

	@Column(name = "IS_CORPER", length = 1)
	public String getIsCorper() {
		return isCorper;
	}

	public void setIsCorper(String isCorper) {
		this.isCorper = isCorper;
	}

	@Column(name = "MSG_MONTH", length = 10)
	public String getMsgMonth() {
		return msgMonth;
	}

	public void setMsgMonth(String msgMonth) {
		this.msgMonth = msgMonth;
	}

	@Column(name = "MSG_QUARTER", length = 10)
	public String getMsgQuarter() {
		return msgQuarter;
	}

	public void setMsgQuarter(String msgQuarter) {
		this.msgQuarter = msgQuarter;
	}

	@Column(name = "MSG_YEAR", length = 10)
	public String getMsgYear() {
		return msgYear;
	}

	public void setMsgYear(String msgYear) {
		this.msgYear = msgYear;
	}

	public void setTbUser(TbUser tbUser) {
		this.tbUser = tbUser;
	}

}